﻿using System;
using System.Collections.Generic;
using System.Text;
using X.DataFactory;
using X.Entity;

namespace X.Bll
{
    public sealed class News
    {
        private static readonly INews dal = DataAccess.CreateNews();

        public static bool Create(NewsInfo newsInfo) { return dal.Create(newsInfo); }
        public static bool Delete(int newsId) { return dal.Delete(newsId); }
        public static bool Update(NewsInfo newsInfo) { return dal.Update(newsInfo); }
        public static IList<NewsInfo> GetList(int topCount) { return dal.GetList(topCount); }
        public static IList<NewsInfo> GetAllList() { return dal.GetAllList(); }
        public static NewsInfo GetNewsInfo(int newId) { return dal.GetNewsInfo(newId); }
        public static NewsInfo GetNewsInfo(string title) { return dal.GetNewsInfo(title); }
    }
}
